var amapFile = require('../../libs/amap-wx.130.js');

Page({
  data: {
    steps: {}
  },
  onLoad: function() {
    var that = this;
    let origin=getApp().globalData.originb+','+getApp().globalData.origina
    let des=getApp().globalData.desb+','+getApp().globalData.desa    
    var myAmapFun = new amapFile.AMapWX({key: '038c54183637f97bf87484c0ce1c7b01'});
    myAmapFun.getWalkingRoute({
      origin: origin,
      destination: des,
      success: function(data){
        if(data.paths && data.paths[0] && data.paths[0].steps){
          that.setData({
            steps: data.paths[0].steps
          });
        }
          
      },
      fail: function(info){

      }
    })
  }
})